ValidatedIngredient

constructor(item: Identifier, itemPredicate: Predicate<Identifier>? = null, tagPredicate: Predicate<Identifier>? = null)

A validated provider of Ingredient

This does not store an ingredient, it stores an IngredientProvider, which lazily generates the ingredient only when requested.

Initializes this validation with a single-item IngredientProvider

Author

fzzyhmstrs

Since

0.2.0

Parameters

item

Identifier defining the item

itemPredicate

Predicate, optional - restricts the set of allowable items (default is any item in the Items registry)

tagPredicate

Predicate, optional - restricts the set of allowable tags (default is any tag in the Items registry)


constructor(set: Set<Any>, itemPredicate: Predicate<Identifier>? = null, tagPredicate: Predicate<Identifier>? = null)

A validated provider of Ingredient

This does not store an ingredient, it stores an IngredientProvider, which lazily generates the ingredient only when requested.

Initializes this validation with a multi-item IngredientProvider

Author

fzzyhmstrs

Since

0.2.0

Parameters

set

Set - Set defining the default tags and items. Anything that isn't an Identifier or Tagkey will be ignored

itemPredicate

Predicate, optional - restricts the set of allowable items (default is any item in the Items registry)

tagPredicate

Predicate, optional - restricts the set of allowable tags (default is any tag in the Items registry)


constructor(tag: TagKey<Item>, itemPredicate: Predicate<Identifier>? = null, tagPredicate: Predicate<Identifier>? = null)

A validated provider of Ingredient

This does not store an ingredient, it stores an IngredientProvider, which lazily generates the ingredient only when requested.

Initializes this validation with a multi-item IngredientProvider

Author

fzzyhmstrs

Since

0.2.0

Parameters

tag

TagKey defining the tag to pull items from

itemPredicate

Predicate, optional - restricts the set of allowable tags (default is any tag from the Items registry)

tagPredicate

Predicate, optional - restricts the set of allowable tags (default is any tag in the Items registry)